package com.joysuch.wwyt.mh.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.joysuch.wwyt.common.entity.UserDataEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * @author Leong
 * @date 2022/9/19 15:19
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("wwyt_mh_alarm_record")
@ApiModel(value = "报警日志对象", description = "")
public class MhAlarmRecord extends UserDataEntity {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("监测点ID")
    private Long monitoringPointId;

    @ApiModelProperty("记录开始时间")
    private LocalDateTime startTime;

    @ApiModelProperty("最近更新时间")
    private LocalDateTime lastTime;

    @ApiModelProperty("数值超限等级:0正常;1低限;2高限;3低低限;4高高限")
    private Integer alarmLevel;

    @ApiModelProperty("数值")
    private String value;

    @ApiModelProperty("报警级别名称:蓝-黄-橙-红")
    private String levelName;

    @ApiModelProperty("累计更新次数")
    private Integer updateCount;

    @ApiModelProperty("超限触发次数")
    private Integer exceedCount;

    @ApiModelProperty("当前最高报警等级:蓝-黄-橙-红")
    private String maxLevelName;

    @ApiModelProperty("当前最高报警等级:0正常;1低限;2高限;3低低限;4高高限")
    private Integer maxLevel;

    @ApiModelProperty("最高等级报警数值")
    private String maxValue;

    @ApiModelProperty("最高等级报警详情")
    private String maxDetail;

    @ApiModelProperty("报警规则")
    private String alarmRule;

    @ApiModelProperty("触发报警前置时间")
    private LocalDateTime changeTime;

    @ApiModelProperty("触发单据号")
    private String alarmCode;

    @ApiModelProperty("当前单据等级")
    private String codeLevelName;

    @ApiModelProperty("激活状态:0否;1是")
    private Integer state;

    private String remark;

    private Long alarmMessageId;

    private String detail;
}
